import { BaseWindow } from "../../../../component/window/BaseWindow";
import { ISeriesLoginRewardWindow } from "../../../../../modules/interfaces/ISeriesLoginRewardWindow";
import { Language } from "../../../../../extend/language/Language";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { GTileList } from "../../../../../com/mui/controls/GTileList";
import { ScrollBarDirection } from "../../../../../fl/controls/ScrollBarDirection";
import { SeriesLoginRewardRenderer } from "./SeriesLoginRewardRenderer";
import { DataProvider } from "../../../../../fl/data/DataProvider";
import { LoadRewardConfig } from "../../../resource/LoadRewardConfig";
//class SeriesLoginRewardWindow
    
    export  class SeriesLoginRewardWindow extends BaseWindow implements ISeriesLoginRewardWindow
    {
        constructor()
        {
            super();
            setSize(340, 430);
            title = Language.getString(90078);
            titleHeight = 30;
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            var loc1=ObjCreate.createBg(20, 45, 300, 345, this);
            var loc2=ObjCreate.createBg(30, 75, 270, 2, this, ImagesConst.SplitLine);
            var loc3=ObjCreate.createTextField(Language.getString(90079), 45, 53, 60, 20, this, GlobalStyle.textFormat2);
            var loc4=ObjCreate.createTextField(Language.getString(90080), 130, 53, 70, 20, this, GlobalStyle.textFormat2);
            var loc5=ObjCreate.createTextField(Language.getString(90081), 225, 53, 70, 20, this, GlobalStyle.textFormat2);
            var loc6;
            (loc6 = ObjCreate.createTextField("", 30, 400, 310, 20, this)).filters = [];
            loc6.htmlText = Language.getString(90082);
            this._titleList = new GTileList();
            this._titleList.setSize(295, 300);
            this._titleList.columnWidth = 275;
            this._titleList.rowHeight = 50;
            this._titleList.direction = ScrollBarDirection.VERTICAL;
            this._titleList.horizontalGap = 0;
            this._titleList.verticalGap = 0;
            this._titleList.styleName = "TileList";
            this._titleList.setStyle("skin", new Object /* flash.display.Bitmap */());
            this._titleList.setStyle("cellRenderer", SeriesLoginRewardRenderer);
            this._titleList.move(20, 80);
            this._titleList.dataProvider = new DataProvider();
            addChild(this._titleList);
            this.updateDataProvider();
            return;
        }

        /* internal  */updateDataProvider(): void
        {
            var loc1=LoadRewardConfig.instance.getLoadRewardArray();
            this._titleList.dataProvider = new DataProvider(loc1);
            return;
        }

        /* internal */ /* var */_titleList: GTileList;
    }
